﻿<%@ Page Language="C#" AutoEventWireup="true"  enableEventValidation="false" CodeFile="hotel_add.aspx.cs" Inherits="EZCRS.HCMS.Web.manage.hotel.hotel_add" %>
<%@ Register Src="../usercontrol/titlepage.ascx" TagName="titlepage" TagPrefix="uc2" %>
<%@ Register Src="../usercontrol/jspage.ascx" TagName="jspage" TagPrefix="uc1" %>
<%@ Register assembly="Book38.Net.CustomControl" namespace="Book38.Net.CustomControl" tagprefix="cc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
      <title></title>
      <script src="../../Common/base_grid.js" language="javascript" type="text/javascript"></script>
     </head>
<body>
    <form id="form1" runat="server">
    <uc2:titlepage id="Titlepage1" runat="server" inittitle="<%$ Resources:Site, LabHotelAdd %>"></uc2:titlepage>
    
        <table cellpadding="0" cellspacing="0" class="main-table" >
            <tr class="line-even">
                <td><table width="90%" border="0" align="center" cellpadding="0" cellspacing="0">
                  <tr align="center">
                    
                    <td width="15%"><asp:Label runat="server" ID="LabHotelHtlName" Text="<%$ Resources:Site, LabHotelHtlName %>"></asp:Label>：</td>
                    <td width="19%">&nbsp;
                    <cc2:WebTextBox runat="server" id="topics" class="text-line" maxlength="20"></cc2:WebTextBox></td>
                    <td width="13%"><asp:Label runat="server" ID="Label1" Text="<%$ Resources:Site, LabHotelAddress %>"></asp:Label>：
                      </td><td>
                      <cc2:WebTextBox runat="server" class="text-line" id="address" maxlength="20"></cc2:WebTextBox></td><td  width="10%">
                        Pid：</td>
                    <td width="13%">&nbsp;
                    <cc2:WebTextBox runat="server" id="pid" class="text-line" maxlength="5" size="5"></cc2:WebTextBox></td>
                    
                    <td width="17%">&nbsp;
                    <input type="button" value="<%=Resources.Site.ButtonSearch %>" onclick="javascript:Page_Load('First');" class="bttn" /></td>
                  </tr>
                </table>                    </td>
            </tr></table>
            <br />
       <div class="optbar">
        <a href="javascript:addintogroup();" class="blue"  onmouseover="currentcolor=this.style.backgroundColor;this.style.backgroundColor='#B9CEEA';" onmouseout="this.style.backgroundColor=currentcolor;"><img src="../../image/save.gif" border="0" align="absmiddle"/><asp:literal ID="Literal1" runat="server" Text="<%$ Resources:Site, LabAdd %>"></asp:literal></a>
        <a href="javascript:delhotel();" class="blue"  onmouseover="currentcolor=this.style.backgroundColor;this.style.backgroundColor='#B9CEEA';" onmouseout="this.style.backgroundColor=currentcolor;"><img src="../../image/save.gif" border="0" align="absmiddle"/><asp:literal ID="Label3" runat="server" Text="<%$ Resources:Site, LabDelete %>"></asp:literal></a>
       </div>
        <div id="loadinfo" align="center"></div>
        <uc1:jspage id="Jspage1" runat="server"></uc1:jspage><input type="hidden" id="orderkey" value="0" /><input type="hidden" id="txt_sql" value="" />
 
    </form>
</body>
</html>
<script language="javascript" type="text/javascript">
function Page_Load(pageindex){
pageindex=pageIndexSetting(pageindex);
var str=$F("topics").value+"|"+$F("address").value+"|"+$F("pid").value;
EZCRS.HCMS.myajax.HotelOrGroup.HotelAlone(pageindex,str ,setTable);
 pageLastSetting(str,pageindex); }

Page_Load('First');

function addintogroup()
{ 
  if(confirm('<%= Resources.Site.ScriptConfirm %>'))
  {
    var str=$FN("cbx");
    if(str!="")
      EZCRS.HCMS.myajax.HotelOrGroup.AddInfoGroup(str,function(resp){Page_Load('First');});
  }
}
function delfromgroup()
{
  if(confirm('<%= Resources.Site.ScriptConfirm %>'))
  {
    var str=$FN("cbx");
    if(str!="")
      EZCRS.HCMS.myajax.HotelOrGroup.RemoveFromGroup(str,function(resp){Page_Load('First');});
  }
}

function delhotel()
{
  if(confirm('<%= Resources.Site.SystemConfirmDelete %>'))
  {
    var str=$FN("cbx");
    EZCRS.HCMS.myajax.HotelOrGroup.DeleteHotel(str,function(resp){Page_Load('First');})
  }
}

AjaxPro.timeoutPeriod = 40000;
var l = $F("loadinfo");
AjaxPro.onLoading = function(b)
{
    l.innerHTML="<img src=\"../../Image/loading.gif\" alt=\"Loading\" align=\"absmiddle\" /><%= Resources.Site.LabLoadInfo %>";
}    
AjaxPro.onError = function(e) 
{
    l.innerHTML="<%= Resources.Site.LabLoadErrInfo %>";
} 
AjaxPro.onTimeout = function(t) 
{
    l.innerHTML="<%= Resources.Site.LabLoadErrInfo %>";
}
</script>